    var preview_img = document.querySelector('.preview_img');
    var mask = document.querySelector('.mask');
    var big = document.querySelector('.big');

    // console.log(preview_img);
    preview_img.addEventListener('mouseover', function () {
        mask.style.display = 'block';
        big.style.display = 'block';
    })


    preview_img.addEventListener('mouseout', function () {
        mask.style.display = 'none';
        big.style.display = 'none';
    })

    preview_img.addEventListener('mousemove', function (e) {
        var x = e.pageX - this.offsetLeft;
        var y = e.pageY - this.offsetTop;
        // console.log(x,y);
        var maskX = x - mask.offsetWidth / 2;
        var masky = y - mask.offsetHeight / 2;


        //鼠标移动图片跟着鼠标移动
        var maskMax = preview_img.offsetWidth - mask.offsetWidth;
        // console.log(maskMax);
        //超出范围则不移动
        if (maskX <= 0)
            maskX = 0;
        else if (maskX >= maskMax)
            maskX = maskMax;
        if (masky <= 0)
            masky = 0;
        else if (masky >= maskMax)
            masky = maskMax;

        mask.style.left = maskX + 'px';
        mask.style.top = masky + 'px';

        //大图片的移动距离
        var bigIMg = document.querySelector('.bigImg');
        // 大图片最大移动距离
        var bigMax = bigIMg.offsetWidth - big.offsetWidth;
        // 大图片的移动距离 X Y
        var bigX = maskX * bigMax / maskMax;
        var bigY = masky * bigMax / maskMax;
        bigIMg.style.left = -bigX + 'px';
        bigIMg.style.top = -bigY + 'px';
    })

